<!-- 我的会员			member -->
<template>
	<view class="">
		<view class="mt10 mb10" v-for="(item,index) in data" :key="index">
			<view class="member-nicheng">
				<view class="w80 mars pt25">
					<view class="vw55 f b c">
						<!-- <image style="width: 120rpx;height: 120rpx;border-radius: 200rpx;" :src="item.img" mode="">
						</image> -->
						<view class="f d">
							<text class="fs36 bold">卡号：{{item.card_num}}</text>
							<text class="fs30 hui p_t_10" v-if="item.type == 1">大池集体卡</text>
							<text class="fs30 hui p_t_10" v-if="item.type == 2">大池私教卡</text>
							<text class="fs30 hui p_t_10" v-if="item.type == 3">小池会员卡</text>
						</view>
					</view>
					<view class="f b c p_t_31">
						<text class="fs24 hui">会员有效期至：{{item.out_time}}</text>
						<text class="fs24 bold" v-if="danqian_time > item.out_time">已过期</text>
						<text class="fs24 bold" v-else>将在{{item.out_time | jisuan}}后到期</text>

					</view>
					<view class="f b c p_t_31">
						<text class="fs24 hui">账户剩余课时：{{item.course_num}}</text>
					</view>
				</view>
			</view>
			<view class="member-xufei pt25 pl30 pr30" style="" v-if="item.is_show == 1">
				<view class=" mars  f b c">
					<view><text class="fs24 bold">续费提醒</text></view>
				</view>
				<view class=" mars ">
					<text class="fs20 hui">{{item.str}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data: [],
				danqian_time: ''
			}
		},
		onLoad(e) {
			// 动态导航条文字
			uni.setNavigationBarTitle({
				title: '我的会员'
			})
			var date = new Date();
			var year = date.getFullYear()
			var month = (date.getMonth() + 1) < 10 ? '0'+ (date.getMonth() + 1): (date.getMonth() + 1)
			var day = date.getDate() < 10 ? '0'+date.getDate() :date.getDate()
			this.danqian_time =  year+ "-" + month + "-" + day
			var data = JSON.parse(decodeURIComponent(e.data));
			this.data = data.viplist
		},
		methods: {
			
		}
	}
</script>

<style scoped>
	.warps {
		width: 100vw;
		/* height:200vh; */
		overflow: hidden;
		background-color: #FFFFFF;
	}

	.guding {
		position: relative;
		width: 750rpx;
		height: 324rpx;
		background-image: url(../../../static/img/033.png);
	}

	.member-nicheng {
		width: 750rpx;
		height: 324rpx;
		background-image: url(../../../static/img/034.png);
		background-repeat: no-repeat;
		background-position: center;
		/* position:absolute; */
	}

	.member-xufei {
		width: 750rpx;
		height: 156rpx;
		background-image: url(../../../static/img/036.png);
		/* margin-top:190rpx; */
		background-repeat: no-repeat;
		background-position: center;
		/* position:absolute; */
		/* left:32rpx; */
	}

	.member-hong {
		width: 96rpx;
		height: 34rpx;
		line-height: 34rpx;
		opacity: 1;
		background: #ce2424;
		border-radius: 18rpx;
	}
</style>
